package jsr292.weaver.opt;

import jsr292.java.lang.invoke.CallSite;
import jsr292.java.lang.invoke.MethodHandle;

class OptimizerMethodInfo {
    enum Kind {
	METHOD_HANDLE_INVOKE,
	INDY_INVOKE
    }

    final Kind kind;
    final MethodHandle mh;
    final /*maybenull*/CallSite cs;
    
    public OptimizerMethodInfo(Kind kind, MethodHandle mh, /*maybenull*/CallSite cs) {
	this.kind = kind;
	this.mh = mh;
	this.cs = cs;
    }
    
    @Override
    public String toString() {
        return kind+":"+mh;
    }
}
